package org.firstspringdema.dycdemo;

public class UserController {
    private UserService userService;

    // 构造函数注入
    public UserController(UserService userService) {
        this.userService = userService;
    }

    public void printServiceInfo() {
        System.out.println("当前使用的服务是:" + userService.getServiceName());
    }
}
